package com.test.tool.demo.websocket;

import org.springframework.amqp.core.Exchange;
import org.springframework.amqp.core.FanoutExchange;
import org.springframework.amqp.rabbit.annotation.EnableRabbit;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author 小八
 * @date 2022年04月26日10:09
 */
@Configuration
@EnableRabbit
public class RabbitMqConfig {

    /**
     * 消息exchange
     */
    public static final String SOCKET_MSG_EXCHANGE = "exchange.fanout.socket.msg";
    @Bean
    public Exchange socketMsgExchange() {
        return new FanoutExchange(SOCKET_MSG_EXCHANGE, true, false);
    }
}
